﻿namespace EasyCMS.Common
{
    using System;
    using System.Collections.Generic;
    using Pismire;


    [System.ServiceModel.ServiceContractAttribute(ConfigurationName = "EasyCMS.Common.IMembers")]
    public interface IMembers
    {
        /// <summary>
        /// 根据ID获取分类数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Action = "http://tempuri.org/EasyCMS.Common.IMembers/GetByID", ReplyAction = "http://tempuri.org/IMembers/GetByIDResponse")]
        EasyCMS.Common.DataComponents.Member GetByID(int id);

        /// <summary>
        /// 根据CodeName获取分类数据
        /// </summary>
        /// <param name="codeName"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Action = "http://tempuri.org/EasyCMS.Common.IMembers/GetByUser", ReplyAction = "http://tempuri.org/IMembers/GetByUserResponse")]
        EasyCMS.Common.DataComponents.Member GetByUser(string userProviderName, string userProviderKey);

        /// <summary>
        /// 查询数据集合
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Name = "GetList", Action = "http://tempuri.org/EasyCMS.Common.IMembers/GetList", ReplyAction = "http://tempuri.org/IMembers/GetListResponse")]
        List<EasyCMS.Common.DataComponents.Member> GetList(EasyCMS.Common.Querys.Member query);

        /// <summary>
        /// 查询数据集合
        /// </summary>
        /// <param name="query"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Name = "GetListFull", Action = "http://tempuri.org/EasyCMS.Common.IMembers/GetListFull", ReplyAction = "http://tempuri.org/IMembers/GetListFullResponse")]
        List<EasyCMS.Common.DataComponents.Member> GetList(EasyCMS.Common.Querys.Member query, out int recordCount);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Action = "http://tempuri.org/EasyCMS.Common.IMembers/Add", ReplyAction = "http://tempuri.org/IMembers/AddResponse")]
        ExcuteState Add(ref EasyCMS.Common.DataComponents.Member member);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Action = "http://tempuri.org/EasyCMS.Common.IMembers/Update", ReplyAction = "http://tempuri.org/IMembers/UpdateResponse")]
        ExcuteState Update(ref EasyCMS.Common.DataComponents.Member member);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContractAttribute(IsOneWay = false, Action = "http://tempuri.org/EasyCMS.Common.IMembers/Delete", ReplyAction = "http://tempuri.org/IMembers/DeleteResponse")]
        ExcuteState Delete(int id);
    }
}
